﻿using ApiLib.AppStart;
using SqlSugar;

namespace ApiLib.Models;

/// <summary>
/// 系统日志、时间线
///</summary>
[Tenant(GlobalConstants.MainDbConfigId), SugarTable("sys_log")]
public class SysLog
{
    /// <summary>
    ///  
    ///</summary>
    [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
    public int Id { get; set; }

    /// <summary>
    /// 类型 
    ///</summary>
    [SugarColumn(ColumnName = "data_type")]
    public string DataType { get; set; }

    /// <summary>
    /// 类型ID 
    ///</summary>
    [SugarColumn(ColumnName = "data_id")]
    public int DataId { get; set; }

    /// <summary>
    /// 行为 
    ///</summary>
    [SugarColumn(ColumnName = "action")]
    public string Action { get; set; }

    /// <summary>
    /// 内容 
    ///</summary>
    [SugarColumn(ColumnName = "content")]
    public string Content { get; set; }

    /// <summary>
    /// 备注 
    ///</summary>
    [SugarColumn(ColumnName = "remark")]
    public string Remark { get; set; }

    /// <summary>
    /// 附件 
    ///</summary>
    [SugarColumn(ColumnName = "annexs")]
    public string Annexs { get; set; }

    /// <summary>
    ///  
    ///</summary>
    [SugarColumn(ColumnName = "create_user")]
    public string CreateUser { get; set; }
    /// <summary>
    ///  
    ///</summary>
    [SugarColumn(IsIgnore = true)]
    public string CreateUserName { get; set; }

    /// <summary>
    ///  
    ///</summary>
    [SugarColumn(ColumnName = "create_time",InsertServerTime = true)]
    public DateTime CreateTime { get; set; }
}